﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using KYO.DAL;
using ObjectPersistence;
using BusinessLayerHelper;

public partial class Admin_Controls_Mod_User_UserList : ListControlBase<User>
{


    UserAssembler service = new UserAssembler();


    public override PersistentList<User> GetListObjects
    {
        get
        {
            return service.ReadCollectionAll();


        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            ToolbarBox1.Header = "User Manager";
            List<UrlItem> urls = new List<UrlItem>();
            UrlItem url = new UrlItem();
            url.Text = "Create New";
            url.Url = DoAction.ActionPageView("User",Action.EDIT);
            urls.Add(url);

            ToolbarBox1.Options = urls;

            LoadData();

        }
    }


}
